/*
 * @(#)FirstStep.java
 */
import jp.ac.kobe_u.cs.cream.*;

public class FirstStep {
    public static void main(String args[]) {
	// Create a constraint network
	Network net = new Network();
	// Declare variables
	IntVariable x = new IntVariable(net);
	IntVariable y = new IntVariable(net);
	// x >= 0
	x.ge(0);
	// y >= 0
	y.ge(0);
	// x + y == 7
	x.add(y).equals(7);
	// 2x + 4y == 20
	x.multiply(2).add(y.multiply(4)).equals(20);
	// Solve the problem
	Solver solver = new DefaultSolver(net);
	Solution solution = solver.findFirst();
	int xv = solution.getIntValue(x);
	int yv = solution.getIntValue(y);
	System.out.println("x = " + xv + ", y = " + yv);
    }
}
